Welcome Guest | Sign in | Register
Windows Controls - DotNet Programming Interview Questions and Answers | LucentBlackBoard | LucentBlackBoard.com

Home > Technical Interviews > Computer Science & Engineering > DotNet Programming > Windows Controls Questions and Answers

11. Where does an ImageList control appear when you add it at the design time?

The ImageList control is a component; therefore, it appears in the component tray at the design time.

12. How can you programmattically prevent a Combobox from dropping, in .NET 4.0?

To avoid dropping of a Combobox, you need to override the WndProc() method and ignore WM_LBUTTONDOWNand WM_LBUTTONDBLCLK events.

13. What is the function of the CheckState property of the CheckBox control?

The CheckState property gets or sets the state of CheckBox.

If the ThreeState property is set to false, the CheckState property value can only be set toCheckState.Indeterminate in code and not by user interaction.

Checked - The CheckBox displays a check mark. The control appears sunken.
Unchecked - The CheckBox is empty. The control appears raised.
Indeterminate - The CheckBox displays a check mark and is shaded.

14. Write a code to select an item in the ListView control programmatically in C#?

To select an item from the ListView control, you can use the following code snippet:
//Make sure the listview has focus
listview1.Focus();
listview1.Items[i].Selected = true;

15. Differentiate between a TextBox control and RichTextBox control.

The TextBox control is an input control, which allows a user to enter text to an application at runtime. By default, it allows only single line text; however, you can change its property to accept the multiline text as well as scroll bar also.

The RichTextBox control is similar to the TextBox control with the difference that it allows the user to format its text also. You can format the text in various ways, such as bold, italic, and underlined as well as change its color and font. You can save your RichTextBox value to a RTF (Rich Text Format) file and load value of RTF file to the RichTextBox control.




Partner Sites
LucentBlackBoard.com                  SoftLucent.com                  LucentJobs.com
All rights reserved © 2012-2015 SoftLucent.